import tornado.web,sre_parse
import os
import tornado.ioloop
from views import *
from user2.views2 import *
from user2.views3 import *
from user2.views4 import *
from my_websocket import *
# 配置url
BASE_DIR=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
settings={
    'MEDIA_ROOT':os.path.join(BASE_DIR,'tornados-first-day-job/imgbao'),
    'debug':True
}

app = tornado.web.Application([
# chat
    (r'/ws/',WebsockHandler),
    (r'/ZZhandler/',ZZhandler),
    (r'/WebsockHandler/',WebsockHandler),
    # (r'/Tongji/',Tongji),
    (r"/getb/", Getb),
    (r"/quit_port/",quit_port),
    (r"/getcate/",MainHandler),
    (r"/rbac/",Rbac),
    (r"/pzbac/",pzrbac),
    (r"/smscode/",Smscode),
    # (r"/imgcode/",Imgcode),
    (r"/addjue/",upjue),
    (r"/getuser/",getuser),
    (r"/getroles/",getroles),
    (r"/login/",Login),
    (r"/adduser/",adduser),
    (r"/addrole/",addrole),
    (r"/uppwd/",uppwd),
    (r"/movelogin/",moveLogin),
    (r"/user/getWBurl/",Surl),
    (r"/user/weiboCallback/",Ssctoken),
    (r"/user/bindM/",Sbd),
    (r"/imgqny/", imgqny),
    (r"/baidu/", character),
    (r"/locality/", Locality),
    (r"/Diaoqudisanf/",OpenbankHandler),
    (r"/userxieyi/",Userxieyi),
    (r"/borrow_money/",borrow_money),
    (r"/getaudit/",getaudit),
    (r"/audit/",audit),
    (r"/payurl/",ailpay_jie),
    (r"/callback",callback),
    (r"/top_up_jie/",top_up_jie),
    (r"/pbutton/",pbutton),
    (r"/getbutton/",getbutton),
    (r"/investment/",investment),
(r"/allow/",allow),




    # allow

],**settings)


if __name__=="__main__":
    app.listen(8000)
    print()
    tornado.ioloop.IOLoop.current().start()